package top.abrsm.mapper;

import org.apache.ibatis.annotations.Select;
import top.abrsm.entity.CarEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 购物车 Mapper 接口
 * </p>
 *
 * @author WuZH
 * @since 2023-11-18
 */
@Mapper
public interface CarMapper extends BaseMapper<CarEntity> {

    @Select (value = "SELECT * FROM car_info ci LEFT JOIN product_info pi ON ci.productId=pi.id WHERE ci.stuId=#{stuId}")
    List<CarEntity> queryList ( String stuId);

}
